package org.miku.module.user;

import org.miku.db.SQLHelper;
import org.miku.tools.Tools;

public class ForgetManager extends BaseUserManager  {
	
	public ForgetManager(SQLHelper sqlHelper) {
		super(sqlHelper);
	}
	
	public boolean validateAnswer(String username, String secAnswer) {
		boolean bRet = false;
		if(!Tools.isEmpty(secAnswer)) {
			String answer = userMgr.getSecAnswer(username);
			return secAnswer.equals(answer);
		}
		return bRet;
	}
	
	public boolean resetPassword(String username, String password) {
		boolean bRet = false;
		if(!Tools.isEmpty(username) && !Tools.isEmpty(password)) {
			bRet = resetPassword(username, password);
		}
		return bRet;
	}
	
}
